import service from "./index";
import {
    ILoginData, tokenData, DepartmentListtype, classesListtype, teacherListtype, studentListtype,
    lessonListtype,templateListttype
} from "../type/login";
import { BomListData } from "../type/bomList"

// 获取token
export function getAccessToken(data: tokenData) {
    return service({
        url: "index/getAccessToken",
        method: "POST",
        data
    })
}


// 登录接口

export function Login(data: ILoginData) {
    return service({
        url: "user/login",
        method: "POST",
        data
    })
}
// 授课院系列表查询
export function departmentDepartmentList(data: DepartmentListtype) {
    return service({
        url: "Department/departmentList",
        method: "POST",
        data
    })
}
// 班级列表
export function departmentClassesList(data: classesListtype) {
    return service({
        url: "Department/classesList",
        method: "POST",
        data
    })
}
// 教师列表
export function teacherList(data: teacherListtype) {
    return service({
        url: "teacher/teacherList",
        method: "POST",
        data
    })
}
// 学生列表

export function studentList(data: studentListtype) {
    return service({
        url: "student/studentList",
        method: "POST",
        data
    })
}
// 课程列表
export function lessonList(data: lessonListtype) {
    return service({
        url: "lesson/lessonList",
        method: "POST",
        data
    })
}

// 模板列表
export function templateList(data: templateListttype) {
    return service({
        url: "template/templateList",
        method: "POST",
        data
    })
}

// 列表
export function BomList(data: BomListData) {
    return service({
        url: "Business/BomList",
        method: "POST",
        data
    })
}
// export function login(data: ILoginData) {
//     return service({
//         url: "/login",
//         method: "POST",
//         data
//     })
// }

// // 商品列表接口
// export function getGoodsList() {
//     return service({
//         url: "/getGoodsList",
//         method: "GET"
//     })
// }
